package com.tencreat.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 发送消息体
 * {"msg":"消息内容","userId":"123","nickName":"","photo":"","type":0,"joinUserId":"","msgType":0}
 * @author zixin
 */
@Data
public class MallMessage {

    /** 消息ID */
    private Long id;

    private String msgId;

    /** 发送者ID */
    private String userId;

    /** 发送者名称 */
    private String nickName;

    /** 发送者头像 */
    private String photo;

    /** 发送者类型 0|APP,1|平台*/
    private Integer type;

    /** 接收者ID  商家、平台*/
    private String joinUserId;

    /** 消息类型 0|普通,1|图片*/
    private Integer msgType;

    /** 消息内容 */
    private String msg;

    /** 发送时间 */
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sendTime;

    /**
     *  操作类型
     *  0|无状态,1|pc端获取列表,2|app端获取未读数,3|心跳
     *  */
    private Integer operationType;

    /**
     * 其他操作接收的参数
     */
    private Object operationParam;
    /****
     * 语音时长
     */
    private int duration;

    private Integer unreadStatus;

    // 是否查今日接待
    private Integer isToday;

    private String mobile;
    private String avatar;

    @ApiModelProperty(value= "未读消息数")
    private Long unreadMessage;
}
